Digital images are widely used in many forms of communication. Examples of media where such images are used include posters, magazines, newsletters, photo albums, invitations, web pages and many others. The position and size at which to display or otherwise reproduce a digital image on a page is determined by the layout of the page. However digital images are often created with little knowledge of the context in which they will be used.
An image may not fit well into a layout because of the difference between an original height or width of the image and the required height or width at which the image is to be reproduced. The required bounds can be of any height, width and aspect ratio. Often, an image needs to be cropped in order to fit into the bounds determined by a layout.
In many cases, the same digital image is reused multiple times under various contexts, and therefore needs to be cropped to various sizes to fit into different layouts accordingly. In addition, a designer, in the process of designing a layout, may need to adjust the layout design from time to time. Each time the layout is adjusted, the image may require re-cropping to fit into whatever new boundary is specified.
To crop a digital image manually requires a user to indicate the position and the size of the crop using an input device of a computer system. To crop the same image over and over again manually is a time-consuming, tedious, error-prone and frustrating experience for the user. Software that provides an automatic image-cropping feature can make the process easier for the user by automatically positioning a crop window of the required size in a digital image.
Some software takes a simplistic approach towards automatic image cropping. An example of a simplistic approach involves centring the crop window over the digital image to be cropped, based on the assumption that the main subject of the image is usually positioned in the centre. Such software has no knowledge about the actual locations of the main subject(s) in the original image. Simply positioning the crop window at the centre can produce some very undesirable crops, e.g. cropping away half of a person's face.
In order to produce more acceptable crops, a software system that does automatic image cropping needs to incorporate some knowledge regarding the subjects captured by a digital image, for example, the positions and sizes of the main subjects. Such information can come from either a human user or a software system that performs automatic subject-detection on digital images.
One such approach proposes a possible crop window of a particular aspect ratio specified by a user. The proposed crop window is positioned at the centre of the main subject area, where the main subject area is the smallest possible rectangular area that contains all the main subjects. This method nevertheless relies on users to manually adjust the position of the crop window in order to achieve a reasonable crop.